3.5.51 \(\int \frac {g+h x}{(a+b \log (c (d (e+f x)^p)^q))^2} \, dx\) [451]

3.5.51.1 Optimal result
3.5.51.2 Mathematica [A] (verified)
3.5.51.3 Rubi [A] (warning: unable to verify)
3.5.51.4 Maple [F]
3.5.51.5 Fricas [A] (verification not implemented)
3.5.51.6 Sympy [F]
3.5.51.7 Maxima [F]
3.5.51.8 Giac [B] (verification not implemented)
3.5.51.9 Mupad [F(-1)]

3.5.51.1 Optimal result

Integrand size = 26, antiderivative size = 224 \[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\frac {e^{-\frac {a}{b p q}} (f g-e h) (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b^2 f^2 p^2 q^2}+\frac {2 e^{-\frac {2 a}{b p q}} h (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b^2 f^2 p^2 q^2}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )} \]

output
(-e*h+f*g)*(f*x+e)*Ei((a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b^2/exp(a/b/p/q)/ 
f^2/p^2/q^2/((c*(d*(f*x+e)^p)^q)^(1/p/q))+2*h*(f*x+e)^2*Ei(2*(a+b*ln(c*(d* 
(f*x+e)^p)^q))/b/p/q)/b^2/exp(2*a/b/p/q)/f^2/p^2/q^2/((c*(d*(f*x+e)^p)^q)^ 
(2/p/q))-(f*x+e)*(h*x+g)/b/f/p/q/(a+b*ln(c*(d*(f*x+e)^p)^q))
 
3.5.51.2 Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.20 \[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=-\frac {e^{-\frac {2 a}{b p q}} (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \left (b e^{\frac {2 a}{b p q}} f p q \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {2}{p q}} (g+h x)-e^{\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )-2 h (e+f x) \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )}{b^2 f^2 p^2 q^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )} \]

input
Integrate[(g + h*x)/(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]
 
output
-(((e + f*x)*(b*E^((2*a)/(b*p*q))*f*p*q*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*(g 
 + h*x) - E^(a/(b*p*q))*(f*g - e*h)*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*ExpInt 
egralEi[(a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q)]*(a + b*Log[c*(d*(e + f*x 
)^p)^q]) - 2*h*(e + f*x)*ExpIntegralEi[(2*(a + b*Log[c*(d*(e + f*x)^p)^q]) 
)/(b*p*q)]*(a + b*Log[c*(d*(e + f*x)^p)^q])))/(b^2*E^((2*a)/(b*p*q))*f^2*p 
^2*q^2*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*(a + b*Log[c*(d*(e + f*x)^p)^q])))
 
3.5.51.3 Rubi [A] (warning: unable to verify)

Time = 1.27 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.47, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2895, 2847, 2836, 2737, 2609, 2846, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}dx\)

\(\Big \downarrow \) 2847

\(\displaystyle -\frac {(f g-e h) \int \frac {1}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b f p q}+\frac {2 \int \frac {g+h x}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b p q}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2836

\(\displaystyle -\frac {(f g-e h) \int \frac {1}{a+b \log \left (c d^q (e+f x)^{p q}\right )}d(e+f x)}{b f^2 p q}+\frac {2 \int \frac {g+h x}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b p q}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2737

\(\displaystyle -\frac {(e+f x) (f g-e h) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}} \int \frac {\left (c d^q (e+f x)^{p q}\right )^{\frac {1}{p q}}}{a+b \log \left (c d^q (e+f x)^{p q}\right )}d\log \left (c d^q (e+f x)^{p q}\right )}{b f^2 p^2 q^2}+\frac {2 \int \frac {g+h x}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b p q}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2609

\(\displaystyle \frac {2 \int \frac {g+h x}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b p q}-\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{b p q}\right )}{b^2 f^2 p^2 q^2}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2846

\(\displaystyle \frac {2 \int \left (\frac {f g-e h}{f \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}+\frac {h (e+f x)}{f \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\right )dx}{b p q}-\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{b p q}\right )}{b^2 f^2 p^2 q^2}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{b p q}\right )}{b^2 f^2 p^2 q^2}+\frac {2 \left (\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^2 p q}+\frac {h (e+f x)^2 e^{-\frac {2 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^2 p q}\right )}{b p q}-\frac {(e+f x) (g+h x)}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

input
Int[(g + h*x)/(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]
 
output
-(((f*g - e*h)*(e + f*x)*ExpIntegralEi[(a + b*Log[c*d^q*(e + f*x)^(p*q)])/ 
(b*p*q)])/(b^2*E^(a/(b*p*q))*f^2*p^2*q^2*(c*d^q*(e + f*x)^(p*q))^(1/(p*q)) 
)) + (2*(((f*g - e*h)*(e + f*x)*ExpIntegralEi[(a + b*Log[c*(d*(e + f*x)^p) 
^q])/(b*p*q)])/(b*E^(a/(b*p*q))*f^2*p*q*(c*(d*(e + f*x)^p)^q)^(1/(p*q))) + 
 (h*(e + f*x)^2*ExpIntegralEi[(2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q) 
])/(b*E^((2*a)/(b*p*q))*f^2*p*q*(c*(d*(e + f*x)^p)^q)^(2/(p*q)))))/(b*p*q) 
 - ((e + f*x)*(g + h*x))/(b*f*p*q*(a + b*Log[c*(d*(e + f*x)^p)^q]))
 

3.5.51.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2609
Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Si 
mp[(F^(g*(e - c*(f/d)))/d)*ExpIntegralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; F 
reeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]
 

rule 2737
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[x/(n*(c*x 
^n)^(1/n))   Subst[Int[E^(x/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ 
[{a, b, c, n, p}, x]
 

rule 2836
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] : 
> Simp[1/e   Subst[Int[(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{ 
a, b, c, d, e, n, p}, x]
 

rule 2846
Int[((f_.) + (g_.)*(x_))^(q_.)/((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.) 
]*(b_.)), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q/(a + b*Log[c*(d + e* 
x)^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] & 
& IGtQ[q, 0]
 

rule 2847
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)*(f + g*x)^q*((a + b*Log[c*(d + e 
*x)^n])^(p + 1)/(b*e*n*(p + 1))), x] + (-Simp[(q + 1)/(b*n*(p + 1))   Int[( 
f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^(p + 1), x], x] + Simp[q*((e*f - d*g) 
/(b*e*n*(p + 1)))   Int[(f + g*x)^(q - 1)*(a + b*Log[c*(d + e*x)^n])^(p + 1 
), x], x]) /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] && Lt 
Q[p, -1] && GtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.5.51.4 Maple [F]

\[\int \frac {h x +g}{{\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{2}}d x\]

input
int((h*x+g)/(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)
 
output
int((h*x+g)/(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)
 
3.5.51.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.46 \[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\frac {{\left ({\left ({\left (b f g - b e h\right )} p q \log \left (f x + e\right ) + a f g - a e h + {\left (b f g - b e h\right )} q \log \left (d\right ) + {\left (b f g - b e h\right )} \log \left (c\right )\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )} \operatorname {log\_integral}\left ({\left (f x + e\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )}\right ) - {\left (b f^{2} h p q x^{2} + b e f g p q + {\left (b f^{2} g + b e f h\right )} p q x\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )} + 2 \, {\left (b h p q \log \left (f x + e\right ) + b h q \log \left (d\right ) + b h \log \left (c\right ) + a h\right )} \operatorname {log\_integral}\left ({\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}\right )\right )} e^{\left (-\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}}{b^{3} f^{2} p^{3} q^{3} \log \left (f x + e\right ) + b^{3} f^{2} p^{2} q^{3} \log \left (d\right ) + b^{3} f^{2} p^{2} q^{2} \log \left (c\right ) + a b^{2} f^{2} p^{2} q^{2}} \]

input
integrate((h*x+g)/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="fricas")
 
output
(((b*f*g - b*e*h)*p*q*log(f*x + e) + a*f*g - a*e*h + (b*f*g - b*e*h)*q*log 
(d) + (b*f*g - b*e*h)*log(c))*e^((b*q*log(d) + b*log(c) + a)/(b*p*q))*log_ 
integral((f*x + e)*e^((b*q*log(d) + b*log(c) + a)/(b*p*q))) - (b*f^2*h*p*q 
*x^2 + b*e*f*g*p*q + (b*f^2*g + b*e*f*h)*p*q*x)*e^(2*(b*q*log(d) + b*log(c 
) + a)/(b*p*q)) + 2*(b*h*p*q*log(f*x + e) + b*h*q*log(d) + b*h*log(c) + a* 
h)*log_integral((f^2*x^2 + 2*e*f*x + e^2)*e^(2*(b*q*log(d) + b*log(c) + a) 
/(b*p*q))))*e^(-2*(b*q*log(d) + b*log(c) + a)/(b*p*q))/(b^3*f^2*p^3*q^3*lo 
g(f*x + e) + b^3*f^2*p^2*q^3*log(d) + b^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p 
^2*q^2)
 
3.5.51.6 Sympy [F]

\[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int \frac {g + h x}{\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}\, dx \]

input
integrate((h*x+g)/(a+b*ln(c*(d*(f*x+e)**p)**q))**2,x)
 
output
Integral((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q))**2, x)
 
3.5.51.7 Maxima [F]

\[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int { \frac {h x + g}{{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}} \,d x } \]

input
integrate((h*x+g)/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="maxima")
 
output
-(f*h*x^2 + e*g + (f*g + e*h)*x)/(b^2*f*p*q*log(((f*x + e)^p)^q) + a*b*f*p 
*q + (f*p*q^2*log(d) + f*p*q*log(c))*b^2) + integrate((2*f*h*x + f*g + e*h 
)/(b^2*f*p*q*log(((f*x + e)^p)^q) + a*b*f*p*q + (f*p*q^2*log(d) + f*p*q*lo 
g(c))*b^2), x)
 
3.5.51.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1930 vs. \(2 (225) = 450\).

Time = 0.39 (sec) , antiderivative size = 1930, normalized size of antiderivative = 8.62 \[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\text {Too large to display} \]

input
integrate((h*x+g)/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="giac")
 
output
-(f*x + e)*b*f*g*p*q/(b^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d 
) + b^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2) - (f*x + e)^2*b*h*p*q/(b^3 
*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d) + b^3*f^2*p^2*q^2*log(c 
) + a*b^2*f^2*p^2*q^2) + (f*x + e)*b*e*h*p*q/(b^3*f^2*p^3*q^3*log(f*x + e) 
 + b^3*f^2*p^2*q^3*log(d) + b^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2) + 
b*f*g*p*q*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b* 
p*q))*log(f*x + e)/((b^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d) 
 + b^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2)*c^(1/(p*q))*d^(1/p)) - b*e* 
h*p*q*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q) 
)*log(f*x + e)/((b^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d) + b 
^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2)*c^(1/(p*q))*d^(1/p)) + 2*b*h*p* 
q*Ei(2*log(d)/p + 2*log(c)/(p*q) + 2*a/(b*p*q) + 2*log(f*x + e))*e^(-2*a/( 
b*p*q))*log(f*x + e)/((b^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log( 
d) + b^3*f^2*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2)*c^(2/(p*q))*d^(2/p)) + b* 
f*g*q*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q) 
)*log(d)/((b^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d) + b^3*f^2 
*p^2*q^2*log(c) + a*b^2*f^2*p^2*q^2)*c^(1/(p*q))*d^(1/p)) - b*e*h*q*Ei(log 
(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q))*log(d)/((b 
^3*f^2*p^3*q^3*log(f*x + e) + b^3*f^2*p^2*q^3*log(d) + b^3*f^2*p^2*q^2*log 
(c) + a*b^2*f^2*p^2*q^2)*c^(1/(p*q))*d^(1/p)) + b*f*g*Ei(log(d)/p + log...
 
3.5.51.9 Mupad [F(-1)]

Timed out. \[ \int \frac {g+h x}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int \frac {g+h\,x}{{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2} \,d x \]

input
int((g + h*x)/(a + b*log(c*(d*(e + f*x)^p)^q))^2,x)
 
output
int((g + h*x)/(a + b*log(c*(d*(e + f*x)^p)^q))^2, x)